FROM openjdk:11.0.7-jre
MAINTAINER xiaofanku, xiaofanku@live.cn
ENV JAVA_VERSION=11.0.7
ENV LANG C.UTF-8
ENV JAVA_HOME=/usr/local/openjdk-11
ENV PATH=/usr/local/openjdk-11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV APP_LOGS="/home/troll/logs"
ADD forum-0.1-SNAPSHOT.jar forum.jar
VOLUME /tmp
VOLUME /target
RUN mkdir -p  ${APP_LOGS}
RUN bash -c 'touch /forum.jar'
EXPOSE 8765
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dspring.profiles.active=docker", "-jar", "/forum.jar"]